<template>
<div id="app">

  <el-table :data="users" style="width: 100%">
    <el-table-column fixed prop="id" label="id" width="150" />
    <el-table-column prop="username" label="用户姓名" width="150" />
    <el-table-column prop="password" label="用户年龄" width="150" />
    <el-table-column prop="NULL" label="用户性别" width="150" />
    <el-table-column prop="NULL" label="用户邮箱" width="150" />
    <el-table-column prop="NULL" label="用户电话" width="150" />
    <el-table-column prop="NULL" label="用户地址" width="150" />
  </el-table>



</div>
</template>

<script>
export default {
  name: "User",
  data() {
    return {
      users:[]
    }
  },
  methods:{
    getUsers(){
      this.$axios.get("/getUserAll")
          .then(res=>{
            console.log(res.data);
            if (res.data.code==200){
              this.users = res.data.data;
            }
          })
          .catch(function(error){
            console.log(error);
          })
    }
  },
  mounted() {
    this.getUsers();
  }
}
</script>

<style scoped>

</style>